﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo02
{
    class DeliveryRobot : Robot
    {
        public int Hours { get; set; }
        public DeliveryRobot(string name, int hours) : base(name)
        {
            this.Hours = hours;
        }
        public override void Speak()
        {
            Console.WriteLine("你好，你订的菜已经完成了！");
            Console.WriteLine("已经工作了{0}小时", Hours);
        }
    }
}
